
var stick = function() {
	if ($(window).height() >= $(document).height()) {
		$("#footer").css({
			position : "absolute",
			bottom : ($("#footer").height() / 2) + "px"
		});
	}
	
	var props = [];
	props["min-height"] = ($(window).height() - 192) + "px";
	$("#main").css(props);
};

$(document).ready(function() {
	stick();
});

$(window).bind('resize', function() {
	stick();
});
